﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类zCost
	/// </summary>
	[Serializable]
	public class zCost : Entity 
	{ 
		 public zCost() 
            : base("zCost") 
        { 

        }


		#region Model
		private int _UID;
		private int? _BillID;
		private string _OrderNo;
		private int? _CSEQNo;
		private int? _ISEQNo;
		private string _SupplyCode;
		private string _SupplyName;
		private string _FeeType;
		private string _Price;
		private string _Qty;
		private string _Currency;
		private string _Exchange;
		private string _Cost;
		private string _CostCNY;
		private string _CheckNo;
		private string _Note;
		private string _DSC;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? BillID
		{
			get{ return _BillID; }
			set
			{
				this.OnPropertyValueChange(_.BillID,_BillID,value);
				this._BillID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string OrderNo
		{
			get{ return _OrderNo; }
			set
			{
				this.OnPropertyValueChange(_.OrderNo,_OrderNo,value);
				this._OrderNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CSEQNo
		{
			get{ return _CSEQNo; }
			set
			{
				this.OnPropertyValueChange(_.CSEQNo,_CSEQNo,value);
				this._CSEQNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? ISEQNo
		{
			get{ return _ISEQNo; }
			set
			{
				this.OnPropertyValueChange(_.ISEQNo,_ISEQNo,value);
				this._ISEQNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SupplyCode
		{
			get{ return _SupplyCode; }
			set
			{
				this.OnPropertyValueChange(_.SupplyCode,_SupplyCode,value);
				this._SupplyCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SupplyName
		{
			get{ return _SupplyName; }
			set
			{
				this.OnPropertyValueChange(_.SupplyName,_SupplyName,value);
				this._SupplyName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FeeType
		{
			get{ return _FeeType; }
			set
			{
				this.OnPropertyValueChange(_.FeeType,_FeeType,value);
				this._FeeType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Price
		{
			get{ return _Price; }
			set
			{
				this.OnPropertyValueChange(_.Price,_Price,value);
				this._Price = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Qty
		{
			get{ return _Qty; }
			set
			{
				this.OnPropertyValueChange(_.Qty,_Qty,value);
				this._Qty = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Currency
		{
			get{ return _Currency; }
			set
			{
				this.OnPropertyValueChange(_.Currency,_Currency,value);
				this._Currency = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Exchange
		{
			get{ return _Exchange; }
			set
			{
				this.OnPropertyValueChange(_.Exchange,_Exchange,value);
				this._Exchange = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Cost
		{
			get{ return _Cost; }
			set
			{
				this.OnPropertyValueChange(_.Cost,_Cost,value);
				this._Cost = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CostCNY
		{
			get{ return _CostCNY; }
			set
			{
				this.OnPropertyValueChange(_.CostCNY,_CostCNY,value);
				this._CostCNY = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CheckNo
		{
			get{ return _CheckNo; }
			set
			{
				this.OnPropertyValueChange(_.CheckNo,_CheckNo,value);
				this._CheckNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DSC
		{
			get{ return _DSC; }
			set
			{
				this.OnPropertyValueChange(_.DSC,_DSC,value);
				this._DSC = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.BillID,
				_.OrderNo,
				_.CSEQNo,
				_.ISEQNo,
				_.SupplyCode,
				_.SupplyName,
				_.FeeType,
				_.Price,
				_.Qty,
				_.Currency,
				_.Exchange,
				_.Cost,
				_.CostCNY,
				_.CheckNo,
				_.Note,
				_.DSC,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_BillID,
				_OrderNo,
				_CSEQNo,
				_ISEQNo,
				_SupplyCode,
				_SupplyName,
				_FeeType,
				_Price,
				_Qty,
				_Currency,
				_Exchange,
				_Cost,
				_CostCNY,
				_CheckNo,
				_Note,
				_DSC,
				_IsSelect,
				_UserCreateID,
				_CreateDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "BillID":
                    this._BillID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "OrderNo":
                    this._OrderNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CSEQNo":
                    this._CSEQNo = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ISEQNo":
                    this._ISEQNo = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "SupplyCode":
                    this._SupplyCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SupplyName":
                    this._SupplyName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FeeType":
                    this._FeeType = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Price":
                    this._Price = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Qty":
                    this._Qty = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Currency":
                    this._Currency = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Exchange":
                    this._Exchange = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Cost":
                    this._Cost = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostCNY":
                    this._CostCNY = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CheckNo":
                    this._CheckNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DSC":
                    this._DSC = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "BillID":
                    return this._BillID; 
				case "OrderNo":
                    return this._OrderNo; 
				case "CSEQNo":
                    return this._CSEQNo; 
				case "ISEQNo":
                    return this._ISEQNo; 
				case "SupplyCode":
                    return this._SupplyCode; 
				case "SupplyName":
                    return this._SupplyName; 
				case "FeeType":
                    return this._FeeType; 
				case "Price":
                    return this._Price; 
				case "Qty":
                    return this._Qty; 
				case "Currency":
                    return this._Currency; 
				case "Exchange":
                    return this._Exchange; 
				case "Cost":
                    return this._Cost; 
				case "CostCNY":
                    return this._CostCNY; 
				case "CheckNo":
                    return this._CheckNo; 
				case "Note":
                    return this._Note; 
				case "DSC":
                    return this._DSC; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","zCost");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","zCost","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BillID = new Field("BillID","zCost","BillID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field OrderNo = new Field("OrderNo","zCost","OrderNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CSEQNo = new Field("CSEQNo","zCost","CSEQNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ISEQNo = new Field("ISEQNo","zCost","ISEQNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SupplyCode = new Field("SupplyCode","zCost","SupplyCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SupplyName = new Field("SupplyName","zCost","SupplyName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FeeType = new Field("FeeType","zCost","FeeType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Price = new Field("Price","zCost","Price");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Qty = new Field("Qty","zCost","Qty");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Currency = new Field("Currency","zCost","Currency");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Exchange = new Field("Exchange","zCost","Exchange");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Cost = new Field("Cost","zCost","Cost");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostCNY = new Field("CostCNY","zCost","CostCNY");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckNo = new Field("CheckNo","zCost","CheckNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","zCost","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DSC = new Field("DSC","zCost","DSC");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","zCost","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","zCost","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","zCost","CreateDate");
		}
		#endregion

 
	}
}

